/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dk.rofl.modes;

import dk.eleit.input.InputManager;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;

/**
 *
 * @author menderleit
 */
public class TitleMode extends Mode {

    @Override
    public void controls(InputManager im) {
        if(!im.isKeyDown(KeyEvent.VK_SPACE) && isSwitchLocked()) {
            setSwitchLock(false);
        }
        if(im.isKeyDown(KeyEvent.VK_SPACE) && !isSwitchLocked()) {
            ModeSwitcher.setNewMode(ModeSwitcher.MODE_GAME);
        }
        if(im.isKeyDown(KeyEvent.VK_F12) && !isSwitchLocked()) {
            ModeSwitcher.setNewMode(ModeSwitcher.MODE_LOADGAME);
            System.out.println("Game Loaded");
        }
    }

    @Override
    public void update(long difTime) {
    }

    @Override
    public void draw(Graphics2D g) {
        g.setColor(Color.yellow);
        g.drawString("Title Mode", 0, 25);
    }

    @Override
    public void exit() {
    }
    
}
